import {
	request
} from '@/utils/request.js'

//电表列表
export const meterList = data => {
	return request({
		url: `/v1/updateElectricity/page`,
		method: 'POST',
		data
	})
}

//获取上期抄表记录
export const getBeforeRecord = id => {
	return request({
		url: `/v1/meterRead/findMeterReadByMeterId/${ id }`,
		method: 'GET'
	})
}

//抄表
export const sendMeter = data => {
	return request({
		url: '/v1/meterRead/meterRead',
		method: 'POST',
		data
	})
}

//获取电表抄表记录
export const getAllRecord = id => {
	return request({
		url: `/v1/meterRead/findMeterReadsByMeterId/${ id }`,
		method: 'GET'
	})
}

//抄表记录通过
export const auditAgree = data => {
	return request({
		url: `/v1/meterRead/recordAudit`,
		method: 'POST',
		data
	})
}

//生成业主订单
export const makeEleOwnerOrder = data => {
	return request({
		url: `/v1/electricityOrder/saveOwnerOrder`,
		method: 'POST',
		data
	})
}
//生成运营商订单
export const makeEleOperatorOrder = data => {
	return request({
		url: `/v1/electricityOrder/saveOperatorOrder`,
		method: 'POST',
		data
	})
}